import { useEffect, useState } from "react"

export default function Dong1() {
    const [state, setState] = useState({
        a: {
            b: 1
        }
    })

    useEffect(() => {
        setTimeout(() => {
            setState({
                ...state,
                a: {
                    ...state.a,
                    b: 2
                }
            })
        }, 1000)
    }, [])
    return (
        <div>
            我是Dong1组件{state.a.b}
        </div>
    )
}
